const messagereducer = (state = [], action) => {
    if (action.type == 'GET_MSG') {
        return action.value
    }
    else if (action.type == 'ADD_MSG') {
        return [...state,action.value]
    }
    else if (action.type == 'DEL_MSG') {
        return []
    }
    return state
}

export default messagereducer